﻿
using Admin.NET.Application.Entity;
using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 设备模板基础输入参数
    /// </summary>
    public class DeviceTemplateInfoBaseInput
    {
        /// <summary>
        /// 离线时间
        /// </summary>
        public virtual int CusdeviceOfflineDecision { get; set; }
        
        /// <summary>
        /// 是否多从机
        /// </summary>
        public virtual bool MultiSlaveMode { get; set; }
        
        /// <summary>
        /// 轮询方式
        /// </summary>
        public virtual PollingMethod PollingMethod { get; set; }
        
        /// <summary>
        /// 状态配置
        /// </summary>
        public virtual StateConfiguration StateConfiguration { get; set; }
        
        /// <summary>
        /// 模板名称
        /// </summary>
        public virtual string TemplateName { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime? CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public virtual DateTime? UpdateTime { get; set; }
        
        /// <summary>
        /// 创建者Id
        /// </summary>
        public virtual long? CreateUserId { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者Id
        /// </summary>
        public virtual long? UpdateUserId { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        public virtual bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 设备模板分页查询输入参数
    /// </summary>
    public class PageDeviceTemplateInfoInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 离线时间
        /// </summary>
        public int? CusdeviceOfflineDecision { get; set; }
        
        /// <summary>
        /// 是否多从机
        /// </summary>
        public bool? MultiSlaveMode { get; set; }
        
        /// <summary>
        /// 轮询方式
        /// </summary>
        public PollingMethod? PollingMethod { get; set; }
        
        /// <summary>
        /// 状态配置
        /// </summary>
        public StateConfiguration? StateConfiguration { get; set; }
        
        /// <summary>
        /// 模板名称
        /// </summary>
        public string? TemplateName { get; set; }
        
    }

    /// <summary>
    /// 设备模板增加输入参数
    /// </summary>
    public class AddDeviceTemplateInfoInput : DeviceTemplateInfoBaseInput
    {
        /// <summary>
        /// 离线时间
        /// </summary>
        [Required(ErrorMessage = "离线时间不能为空")]
        public override int CusdeviceOfflineDecision { get; set; }
        
        /// <summary>
        /// 是否多从机
        /// </summary>
        [Required(ErrorMessage = "是否多从机不能为空")]
        public override bool MultiSlaveMode { get; set; }
        
        /// <summary>
        /// 轮询方式
        /// </summary>
        [Required(ErrorMessage = "轮询方式不能为空")]
        public override PollingMethod PollingMethod { get; set; }
        
        /// <summary>
        /// 状态配置
        /// </summary>
        [Required(ErrorMessage = "状态配置不能为空")]
        public override StateConfiguration StateConfiguration { get; set; }
        
        /// <summary>
        /// 模板名称
        /// </summary>
        [Required(ErrorMessage = "模板名称不能为空")]
        public override string TemplateName { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        [Required(ErrorMessage = "软删除不能为空")]
        public override bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 设备模板删除输入参数
    /// </summary>
    public class DeleteDeviceTemplateInfoInput : BaseIdInput
    {
    }

    /// <summary>
    /// 设备模板更新输入参数
    /// </summary>
    public class UpdateDeviceTemplateInfoInput : DeviceTemplateInfoBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }

        public List<DeviceSlaveTemplate> DeviceSlaveTemplates { get; set; }
        
    }

    /// <summary>
    /// 设备模板主键查询输入参数
    /// </summary>
    public class QueryByIdDeviceTemplateInfoInput : DeleteDeviceTemplateInfoInput
    {

    }
